<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let name = "张三";
        let obj = {
            name
        }
        console.log(obj);
        console.log(obj.name);

        let w = {
            dayin: function () {
                console.log("你好")
            }
        }
        // console.log(w.dayin)
        w.dayin()

        let w1 = {
            dayin () {
                console.log("你1ss好")
            }
        }
        w1.dayin()

        let d1 ={
            name:"李四"
        }
        let d2 ={
            a1:"1"
        }
        let d3 ={
            a2:"2"
        }

        console.log(Object.assign(d1,d3,d2));
        let f = Object.assign({},d1,d3,d2);
        console.log(f)

        let obj1 ={
            name:"张三",
            age:18,
            
            shu:[1,2,3]
        }
        console.log(obj1)
      
        let obj2 = Object.assign({},obj1)
        console.log(obj2)

        obj1.name="傻子"
        console.log(obj1)
        console.log(obj2)



        obj2.shu[1]="英国女王";
        console.log(obj1)
        console.log(obj2)

       
        console.log( Object.keys(obj1))
        console.log( Object.values(obj1))




        

    </script>
</body>

</html>